package com.taotao.portal.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.portal.service.IItemParamItemService;

@Controller
@RequestMapping("/item/param/")
public class ItemParamItemController {
	@Autowired
	private IItemParamItemService itemParamItemService;

	@RequestMapping(value = "/{itemId}", produces = MediaType.TEXT_HTML_VALUE
			+ ";charset=utf-8")
	@ResponseBody
	public String getItemParamItemByItemId(@PathVariable Long itemId) {
		if (null != itemId) {
			String str = this.itemParamItemService
					.getItemParamItemByItemId(itemId);
			if (StringUtils.isNotBlank(str)) {
				return str;
			}
		}
		return "";
	}
}
